﻿@model Vacation.Models.CreatUserModel
@{
    ViewBag.Title = "创建用户";
}
<h2>创建用户</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <table width="100%" class="edit">
        <tr>
            <th>
                <div class="editor-label">
                    @Html.LabelFor(model => model.UserName)
                </div>
            </th>
            <td>
                <div class="editor-field">
                    @Html.TextBoxFor(model => model.UserName)
                    @Html.ValidationMessageFor(model => model.UserName)
                </div>
            </td>
        </tr>
        <tr>
            <th>
                <div class="editor-label">
                    @Html.LabelFor(model => model.RealName)
                </div>
            </th>
            <td>
                <div class="editor-field">
                    @Html.TextBoxFor(model => model.RealName)
                    @Html.ValidationMessageFor(model => model.RealName)
                </div>
            </td>
        </tr>
        <tr>
            <th>
                <div class="editor-label">
                    @Html.LabelFor(model => model.School)
                </div>
            </th>
            <td>
                <div class="editor-field">
                    @Html.DropDownList("School")
                    @Html.ValidationMessageFor(model => model.School)
                </div>
            </td>
        </tr>
        <tr>
            <th>
                <div class="editor-label">
                    @Html.LabelFor(model => model.Email)
                </div>
            </th>
            <td>
                <div class="editor-field">
                    @Html.TextBoxFor(model => model.Email)
                    @Html.ValidationMessageFor(model => model.Email)
                </div>
            </td>
        </tr>
        <tr>
            <th>
                <div class="editor-label">
                    @Html.LabelFor(model => model.Password)
                </div>
            </th>
            <td>
                <div class="editor-field">
                    @Html.PasswordFor(model => model.Password)
                    @Html.ValidationMessageFor(model => model.Password)
                </div>
            </td>
        </tr>
        <tr>
            <th>
                <div class="editor-label">
                    @Html.LabelFor(model => model.ConfirmPassword)
                </div>
            </th>
            <td>
                <div class="editor-field">
                    @Html.PasswordFor(model => model.ConfirmPassword)
                    @Html.ValidationMessageFor(model => model.ConfirmPassword)
                </div>
            </td>
        </tr>
    </table>
    <p style="text-align: center">
        <input type="submit" value="创建" />
    </p>
}
<div>
    @Html.ActionLink("返回列表", "UserIndex")
</div>
